import assessCheckApi from './api'
import { axios } from '@/utils/request'
import router from '@/router/index'
import blobType from '@/common/blobType'
var menuType = blobType.menuType
var fywflcodeArr = blobType.fywflcodeArr
var fywflcode = ''
export function pushQyBcZgNotice(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url: assessCheckApi.pushQyBcZgNotice,
    method:'post' ,
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside'
  })
}

export function pushQyBqbzNotice(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.pushQyBqbzNotice,
    method:'post',
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function returnZwfwxt(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.returnZwfwxt,
    method:'post',
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function spcysubmitFlowByZwfw(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.spcysubmitFlowByZwfw,
    method:'post',
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function qycjsqlcsubmitFlow(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.qycjsqlcsubmitFlow,
    method:'post',
    data:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}
export function getLastNodeBlyj(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.getLastNodeBlyj,
    method:'get',
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function spcygetSummaryOpinionInScyj(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.spcygetSummaryOpinionInScyj,
    method:'get',
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}


export function initWjgetZzzBqbzFile(params){
  fywflcode = fywflcodeArr[menuType.indexOf(router.app._route. name.substring(router.app._route.name.indexOf('__'),router.app._route.name.indexOf('_a')+2))]
  return axios({
    url:assessCheckApi.initWjgetZzzBqbzFile,
    method:'get',
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
  })
}

export function getWebOfficeDownloadFile(parameter) {
  return axios({
    url: assessCheckApi.getWebOfficeDownloadFile,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function getDocxToPdf(parameter) {
  return axios({
    url:assessCheckApi.getDocxToPdf,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function againEditPdfOnlineFile(parameter) {
  return axios({
    url:assessCheckApi.againEditPdfOnlineFile,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function spcySqsxWjjlgetLocalFileById(params){
  return axios({
    url: assessCheckApi.spcySqsxWjjlgetLocalFileById,
    method:'get' ,
    params:params?{...params,fywflcode:fywflcode?fywflcode:(params.fywflcode?params.fywflcode:'')}:{},
    url_1:'outside',
    responseType: 'arraybuffer'
  })
}

export function webOfficeApiopenFile(parameter) {
  return axios({
    url:assessCheckApi.webOfficeApiopenFile,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function initWjinitZzzBqbzFile(parameter) {
  return axios({
    url:assessCheckApi.initWjinitZzzBqbzFile,
    method: 'post',
    data: parameter,
    url_1:'outside'
  })
}

export function initWjgetZzzQycjFile(parameter) {
  return axios({
    url:assessCheckApi.initWjgetZzzQycjFile,
    method: 'get',
    params: parameter,
    url_1:'outside'
  })
}

export function initWjinitQycjFile(parameter) {
  return axios({
    url:assessCheckApi.initWjinitQycjFile,
    method: 'post',
    data: parameter,
    url_1:'outside'
  })
}

export function spcySqsxWjjldeleteFileById(params){
  return axios({
    url: assessCheckApi.spcySqsxWjjldeleteFileById,
    method:'delete' ,
    params:params,
    url_1:'outside'
  })
}
export function initWjuploadQxtztzs(params){
  return axios({
    url: assessCheckApi.initWjuploadQxtztzs,
    method:'post' ,
    data:params,
    url_1:'outside'
  })
}

